.box {
    width: 100px;
    height: 100px;
    background-color: red;
    transform-origin: 50% 50%;
    /* transition: all 1s ease-in-out; */
    /* transform: rotateZ(45deg); */
    animation: rotateZ 2s infinite;
}


@keyframes rotateZ {
    0% {
        transform: translateX(0) rotateZ(0deg);
    }

    /* 50% {
        transform: translateX(100px) rotateZ(180deg);
    } */

    100% {
        transform: translateX(100%) rotateZ(360deg);
    }
}